<?php
namespace Transform;

class PostReplyTransform extends Transform
{
    public function index($arguments)
    {
        return [
            'allows' => ['reply_id', 'post_id',
                'contents', 'pid', 'views', 'zan_num', 'create_time', 'author', 'human_time', 'is_zan'],
            'author' => [
                'user_id','nickname','face','sex'
            ],
        ];
    }

    public function sub($arguments)
    {
        return [
            'allows' => ['reply_id', 'post_id',
                'contents', 'pid', 'views', 'zan_num', 'create_time', 'author', 'root_reply_id', 'at', 'human_time', 'is_zan'],
            'author' => [
                'user_id','nickname','face','sex'
            ],
            'at' => [
                'trans' => ['name' => 'User', 'method' => 'pub']
            ],

        ];
    }

}
